package com.zhku.xxl.dao.daoImp;

import com.zhku.xxl.dao.AlumniAdminDao;
import com.zhku.xxl.entity.AlumniAdmin;
import jdbc.BasicDao;
import jdbc.GenericDao;

public class AlumniAdminDaoImp extends GenericDao<AlumniAdmin> implements AlumniAdminDao {


    @Override
    public AlumniAdmin findByAccountAndPassword(Object account, Object password, Object username) {
        return super.findByAccountAndPassword(AlumniAdmin.class,account,password,username);
    }

    @Override
    public int insertAlumni(int id, String username, String password, String account, String contact, String email, String imageUrl) {
         String sql = "INSERT INTO alumniadmin (adminId, username, password, account, contact, email, imageUrl) "
                + "VALUES (?, ?, ?, ?, ?, ?, ?)";

        return new BasicDao().update(sql,id,username,password,account,contact,email,imageUrl);
    }
}
